import request from '@/utils/request'

export function postCommodityFind(data) {
  return request({
    url: `/api/operation/commodity/find`,
    method: 'post',
    data
  })
}

export function postCommoditySummary(tenantId,data) {
  return request({
    url: `/api/operation/commodity/summary?tenantId=${tenantId}`,
    method: 'post',
    data
  })
}

export function postCommodityTrend(data) {
  return request({
    url: `/api/operation/commodity/trend`,
    method: 'post',
    data
  })
}

export function postDeviceFind(data) {
  return request({
    url: `/api/operation/device/find`,
    method: 'post',
    data
  })
}

export function getDeviceTrend(tenantId) {
  return request({
    url: `/api/operation/device/trend?tenantId=${tenantId}`,
    method: 'get'
  })
}

export function getOrderSummary(tenantId) {
  return request({
    url: `/api/operation/order/summary?tenantId=${tenantId}`,
    method: 'get'
  })
}

export function getOrderTrend(data) {
  return request({
    url: `/api/operation/order/trend`,
    method: 'post',
    data
  })
}

export function getOperationSummary(tenantId) {
  return request({
    url: `/api/operation/summary?tenantId=${tenantId}`,
    method: 'get'
  })
}